<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .item-container{
            margin-top: 60px;
            background-color: palevioletred;
        }

        .item{
            border: solid 2px red;
            padding: 40px;
        }

        .item1{
            border-color: lawngreen;
        }

        .item2{
            display: inline-block;
        }

        .item-inline {
            width: 100px;
            height: 100px;
            padding: 10px 10px;
            border: solid 1px;
        }
    </style>
</head>
<body>
<section class="container">
    <h4>inline 和 inline-block测试</h4>
    <div class="item-container">
        <span class="item item1">inline</span>
    </div>
    <br>
    <div class="item-container">
        <span class="item item2">inline-block</span>
    </div>
</section>
<section>
    <h4>inline测试</h4>
    <span class="item-inline">我是inline，设置宽高没用，margin上下没用</span>
</section>
<section>
    <ul>
        <li>inline 的padding-bottom和padding-top 会超出父元素</li>
        <li>inline-block 的padding-bottom和padding-top 不会超出父元素</li>
        <li>inline 设置宽高没用，只能设置margin-left有效</li>
    </ul>
</section>
</body>
</html>
